package org.leaf.green.b2b

import org.leaf.green.admin.RecordType

class Category {

    RecordType recordType
    String serialNumber
    String name
    Boolean isActive
    Date dateCreated
    Date lastUpdated

    static constraints = {
        recordType(nullable:false)
        serialNumber(nullable:false, blank:false, unique:'recordType', maxSize:6)
        name(nullable:false, blank:false, maxSize:20)
        isActive(nullable:true)
    }
    
    String toString() {
        return "[$serialNumber], $name"
    }
    
    static mapping = {
        table 'B2B_CATEGORY'
    }
}
